﻿using System.Configuration;

namespace AppFx.BizTalk.Container.Config
{
    public class ContainerCollection : ConfigurationElementCollection
    {
        public ContainerElement this[int index]
        {
            get { return (ContainerElement)BaseGet(index); }
        }

        public new ContainerElement this[string key]
        {
            get { return (ContainerElement)BaseGet(key); }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new ContainerElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((ContainerElement)element).ContainerName;
        }
    }
}

